/*
 * INodeIndirect.h
 *
 *  Created on: Jul 7, 2009
 *      Author: elkobir
 */

#ifndef INODEINDIRECT_H_
#define INODEINDIRECT_H_

#include <iostream>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <iostream>
#include <string>
#include <iomanip>
#include <fstream>
#include <vector>
#include <sstream>
#include "Utils.h"
#include "Log.h"
using namespace std;

class INodeIndirect {
private:
	vector<int> _addresses;
	int _addressesInBlockCount;
	int _blockSizeInBytes;
	void fromBytes(unsigned char* data);

public:
	INodeIndirect(int blockSizeInBytes);
	INodeIndirect(int blockSizeInBytes, unsigned char* data);
	virtual ~INodeIndirect();

	unsigned char* toBytes();
	vector<int>* getBlockList();
	int getBlockAt(int i);
	void setBlockAt(int i, int dBlockNum);
};

#endif /* INODEINDIRECT_H_ */
